{{ $posts := where site.RegularPages "Section" "blog" }}
{{ $num   := len $posts }}
<section class="section">
  <div class="container">
    <div class="columns">
      <div class="column">
        {{ range $idx, $post := $posts }}
        {{ $isLast  := eq (add 1 $idx) $num }}
        {{ $authors := .Params.authors }}
        <article class="blog-article">
          <header class="blog-header">
            <p class="title is-size-2 is-size-3-mobile has-text-weight-light{{ if $authors }} is-spaced{{ end }}">
              <a href="{{ .RelPermalink }}">
                {{ $post.Title }}
              </a>
            </p>

            {{ partial "blog/authors.html" $authors }}

            {{ with $post.Date }}
            {{ $date := dateFormat "January 2, 2006" . }}
            <p class="is-size-5 is-size-6-mobile">
              {{ $date }}
            </p>
            {{ end }}
          </header>

          <hr class="thick-hr" />

          <main class="blog-main">
            {{ .Summary }}
          </main>
        </article>

        {{ if not $isLast }}
        <hr />
        {{ end }}
        {{ end }}
      </div>

      {{ partial "blog/post-list.html" . }}
    </div>
  </div>
</section>
